{% extends "base.html" %}
{% block content %}

<div style="float:right;"><a href="/">Home</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a href="/add" title="Write the blog">Write</a></div>
    <table width="100%">
        <tr bgcolor="#EEFFEE">
          <td valign="top" width="80%">
            <a href='/blog/{{greeting.key}}'>{{greeting.title}}</a></td>
        </tr>
        <tr><td>{{ greeting.content_converted }}<br>
<div class="tagDiv">
tags : 
{% for tag in greeting.tags%}
	<a href="/tags/{{tag}}">{{tag}}</a>&nbsp;
{% endfor %}
</div>
</td></tr>
        <tr>
          <td align="right">
          	{% if isCanEdit %}
          	<a href='/edit/{{greeting.key}}'>Edit</a>
	                  &nbsp;&nbsp;
	                  <a href="javascript:confirmDelete('/delete/{{greeting.key}}');">Delete</a>
	           {%endif%}       
	                     &nbsp;&nbsp;   {{greeting.author.nickname}}@{{greeting.date|date:"Y-m-d H:i:s"}}</td>
        </tr>		
</table>

<div class="hrDiv">
Responses :
</div>
<div class="replyDiv">
	{% for reply in replys %}	
	<div class="oneReply">
    	<div class="reponse">Response from : 
        <a {%ifnotequal reply.url '' %} href="{{reply.url}}" {%endifnotequal%}>
        <span>
        {% ifequal reply.author Null%}
        anonymous
        {% endifequal%}
        {% ifnotequal reply.author Null%}
        {{reply.author.nickname}}
        {% endifnotequal%}
        </span>
      </a>
        </div>
        <div class="replyContent">{{reply.content|linebreaksbr}}</div>
    </div>
    <div class="interval"></div> 
	{% endfor %}
	</div>
    <div class="addReply">
 <form action="/reply/add" method="post" onSubmit="return checkReply();">
    	<input type="hidden" name="upid" value="{{greeting.key}}">
    	Homepage:<br>
   	    <input type="text" name="url" size="30" maxlength="50">
      <br>
Content:<br>
<textarea name="content" rows="6" cols="45"></textarea>
<br>

<input type="submit" value="Submit">
</form>
    </div>
     <div class="fdiv">
		<div style="color:#777;float:left;"></div>		
	</div>

{% endblock %}
